package graphics;

/**
 * Simple point class.  Defines a point in (x,y) format and produces
 * a standard awt point if needed
 *
 * @author      Gabriel Loewen
 */
public class Point {

    //x and y coordinates
    public int x;
    public int y;

    /**
     * Default Constructor
     */
    public Point(){}

    /**
     * Constructor, accepts an x and y point
     */
    public Point(int x, int y){
        this.x = x;
        this.y = y;
    }

    /**
     * Update the x and y coordinate of the point
     */
    public void update(int x, int y){
        this.x = x;
        this.y = y;
    }

    /**
     * Returns a standard awt point object
     */
    public java.awt.Point getPoint() {
        java.awt.Point pnt = new java.awt.Point(x,y);
        return pnt;
    }

    /**
     * Returns the point in (x,y) format as a string
     */
    @Override
    public String toString() {
        return this.x + "," + this.y;
    }

}